//
//  JWBoJianDetailsCell.m
//  jinwang
//
//  Created by jzb on 2018/3/29.
//  Copyright © 2018年 jzb. All rights reserved.
//

#import "JWBoJianDetailsCell.h"

@implementation JWBoJianDetailsCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (void)setModel:(BJDynamicSnapshotModel *)model{
    _model = model;
    
    self.user_nickname.text = model.user_nickname;
    [self.user_portrait sd_setImageWithURL:[NSURL URLWithString:model.user_portrait] placeholderImage:[UIImage imageNamed:@"默认头像"]];
    self.post_title.text = model.post_title;
    self.timeAndDistance.text = [NSString stringWithFormat:@"%@    %@",model.time,model.distance];
    self.see_num.text = [NSString stringWithFormat:@"人气%@",model.see_num];
    self.praise_num.text = [NSString stringWithFormat:@"%@",model.praise_num];
    self.gift_num.text = [NSString stringWithFormat:@"%@",model.gift_num];
    self.comment_num.text = [NSString stringWithFormat:@"%@",model.comment_num];
    self.share_num.text = [NSString stringWithFormat:@"%@",model.share_num];
    //    NSArray* array = [model.post_content componentsSeparatedByString:@","];
    //    [self.imgsFirstImg sd_setImageWithURL:[NSURL URLWithString:array[0]] placeholderImage:[UIImage imageNamed:@"默认头像"]];
    //    [self.imgsFirstImg setContentMode:UIViewContentModeScaleAspectFill];
    //
    //    self.imgsFirstImg.clipsToBounds = YES;
    
//    if (model.imgs.count > 0) {
//
//        self.imgsBGView.imageUrls = model.imgs;
//
//    }
    if ([model.post_type integerValue] == 0) {
        
//        if (model.post_content.length > 0){
//            WBImageView *webView = [[WBImageView alloc]init];
//            NSArray* array = [model.post_content componentsSeparatedByString:@","];
//            webView.imageUrls = array;
//            [self.imgsBGView addSubview:webView];
//            
//            
//        }
    }
    
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
